<script setup lang='ts'>
	import {
		reactive
	} from 'vue';
	import {
		ref
	} from 'vue'
	let items = reactive([{
			value: '1',
			name: '买错了',
			checked: 'true'
		},
		{
			value: '2',
			name: '计划有变，没时间体验'
		},
		{
			value: '3',
			name: '评价不好'
		},
		{
			value: '4',
			name: '有其他更好的选择'
		},
		{
			value: '5',
			name: '其他'
		}
	]);
	const current = ref(0);
	const radioChange = (ev) => {
		for (let i = 0; i < items.length; i++) {
			if (items[i].value === ev.detail.value) {
				current.value = i;
				break;
			}
		}
	}
</script>
<template>
	<view class="backcolor">
		<view class="d4">
			<view class="between2"><text>订单号:</text><text class="tel">2343422</text></view>
			<view class="between"><text>
					老年人体检套餐豪华版（女）</text><text class="tel">￥998</text></view>
			<view class="between"><text>脑部CT</text><text class="tel">￥300</text></view>
			<view class="between"><text>心电图</text><text class="tel">￥99</text></view>
			<view class="between"><text style="color:rgb(255, 102, 0);">合计</text><text style="color:rgb(255, 102, 0);"
					class="tel">￥1397</text>
			</view>
		</view>
		<!-- 退款原因 -->
		<view class="uni-list">
			<view class="between"><text>退款原因</text><text class="money">3-10个工作日原路返回</text></view>
			<radio-group @change="radioChange">
				<label class="uni-list-cell uni-list-cell-pd" v-for="(item, i) in items" :key="item.value">
					<view class="list-radio">
						<radio :value="item.value" :checked="i === current" />
						<text>{{item.name}}</text>
					</view>
				</label>
			</radio-group>
		</view>
		<!-- 取消预约并退款 -->
		<view class="page-container">
			<!-- 底部内容 -->
			<view class="zlj-bottom">
				<view>取消预约并退款</view>
			</view>
		</view>
	</view>
</template>



<style lang="scss">
	.backcolor {
		height: 100vh;
		background-color: rgb(244, 246, 246);
	}

	.between {
		display: flex;
		justify-content: space-between;
		padding: 10rpx 0;

		text {
			margin-right: 30rpx;
			margin-left: 30rpx;
		}
	}

	.between2 {
		padding-bottom: 10rpx;
		border-bottom: 2rpx solid rgb(242, 242, 242);

		text {
			margin-left: 30rpx;
		}
	}

	.d4 {
		font-size: 30rpx;
		margin-top: 20rpx;
		background-color: #fff;
	}

	.uni-list {
		margin-top: 20rpx;
		background-color: #fff;

		.money {
			color: rgb(150, 159, 171);
		}
	}

	.uni-label-pointer,
	.uni-list-cell,
	.uni-list-cell-pd {
		display: flex;
		border-bottom: 2rpx solid rgb(242, 242, 242);
		padding: 16rpx 0;
		margin-left: 24rpx;
		flex-direction: column;
	}

	.list-radio {
		padding-right: 14rpx;
	}

	.page-container {
		position: fixed;
		bottom: 0rpx;
		left: 0rpx;
		width: 100%;
		height: 100rpx;
		border-top: 2rpx solid rgb(89, 181, 141);
		background-color: #ffffff;

		.zlj-bottom {
			height: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			align-content: center;

			view:nth-child(1) {
				text-align: center;
				height: 100%;
				line-height: 100rpx;
				font-size: 38rpx;
				background-color: rgb(89, 181, 141);
				flex: 1;
				// border-radius: 0 0 48rpx 0;
				color: rgb(244, 246, 246);
			}
		}
	}
</style>